import request from '@/config/axios'

export function getBuildingCascadeClassificationApi() {
	return request.post<CascadeClassificationVo[]>({
		url: '/game/g-building/readOnly/getBuildingCascadeClassification'
	})
}

export function getBuildingDetailByIdApi(buildingId: number) {
	return request.get<BuildingDetailVo>({
		url: '/game/g-building/readOnly/getBuildingDetailById/' + buildingId
	})
}

export function getAllLandformApi() {
	return request.get<GLandform[]>({
		url: '/game/g-building/readOnly/getAllLandform'
	})
}

export function saveBuildingApi(data: SaveBuildingRequest) {
	return request.post({
		url: '/game/g-building/saveBuilding',
		data
	})
}

export function deleteBuildingApi(id: number) {
	return request.delete({
		url: '/game/g-building/deleteBuilding/' + id
	})
}

export function getAllLandformByBuildingIdApi(buildingId: number) {
	return request.get({
		url: '/game/g-building/readOnly/getAllLandformByBuildingId/' + buildingId
	})
}
